<%-- 
    Document   : Attendance
    Created on : May 15, 2014, 1:51:06 PM
    Author     : Mukesh
--%>

<%@page import="java.util.GregorianCalendar"%>
<%@page import="java.util.Calendar"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            Calendar mycal = new GregorianCalendar(2014, Calendar.MAY, 1);

// Get the number of days in that month
            int daysInMonth = mycal.getActualMaximum(Calendar.DAY_OF_MONTH); // 28
            int weekends = mycal.getActualMaximum(Calendar.SUNDAY); // 28

            int count = 0;
            for (int day = 1; day <= daysInMonth; day++) {
                mycal.set(2014, Calendar.MAY, day);
                int dayOfWeek = mycal.get(Calendar.DAY_OF_WEEK);
                if (dayOfWeek == Calendar.SUNDAY || dayOfWeek == Calendar.SATURDAY) {
                    count--;
                    // Or do whatever you need to with the result.
                }%>
              <input type="checkbox">
            <%}%>
            
        

        <input type="checkbox">
    </body>
</html>
